﻿using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace TestAngular.Migrations
{
    public partial class Customer_UpdateCustomerTypeIdDeleteBehavior : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropForeignKey(
                name: "FK_BasicArchivesCustomer_BasicArchivesCustomerType_CustomerTypeId",
                table: "BasicArchivesCustomer");

            migrationBuilder.DropForeignKey(
                name: "FK_BasicArchivesCustomer_BasicArchivesOperator_OperatorId",
                table: "BasicArchivesCustomer");

            migrationBuilder.AddForeignKey(
                name: "FK_BasicArchivesCustomer_BasicArchivesCustomerType_CustomerTypeId",
                table: "BasicArchivesCustomer",
                column: "CustomerTypeId",
                principalTable: "BasicArchivesCustomerType",
                principalColumn: "Id",
                onDelete: ReferentialAction.Restrict);

            migrationBuilder.AddForeignKey(
                name: "FK_BasicArchivesCustomer_BasicArchivesOperator_OperatorId",
                table: "BasicArchivesCustomer",
                column: "OperatorId",
                principalTable: "BasicArchivesOperator",
                principalColumn: "Id",
                onDelete: ReferentialAction.Restrict);
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropForeignKey(
                name: "FK_BasicArchivesCustomer_BasicArchivesCustomerType_CustomerTypeId",
                table: "BasicArchivesCustomer");

            migrationBuilder.DropForeignKey(
                name: "FK_BasicArchivesCustomer_BasicArchivesOperator_OperatorId",
                table: "BasicArchivesCustomer");

            migrationBuilder.AddForeignKey(
                name: "FK_BasicArchivesCustomer_BasicArchivesCustomerType_CustomerTypeId",
                table: "BasicArchivesCustomer",
                column: "CustomerTypeId",
                principalTable: "BasicArchivesCustomerType",
                principalColumn: "Id");

            migrationBuilder.AddForeignKey(
                name: "FK_BasicArchivesCustomer_BasicArchivesOperator_OperatorId",
                table: "BasicArchivesCustomer",
                column: "OperatorId",
                principalTable: "BasicArchivesOperator",
                principalColumn: "Id");
        }
    }
}
